package com.itheima;

/**
 * 2025/4/14 19:58
 */
public class Car {
    public String brand;
    public double price;

    //编译器自动给我们添加空参构造器的前提是当前类中没有任何构造器

    public Car(){
        System.out.println("Car类的无参构造方法");//打日志
    }

    public Car(String brand,double price){
        this.brand = brand;
        this.price = price;
        System.out.println("Car类的有参构造方法");
    }


}
